<?php echo($info==null?'<pre>暂无进度</pre>':'<div class="gantt"></div>'); ?>
<script>
$(function() {
	$(".gantt").gantt({
		source: [
			<?php 
				$colorClass=['ganttRed','ganttGreen','ganttOrange'];
				foreach($info as $k){
					echo('{name:"'.$k['task_name']);
					echo('",values:[{from:"/Date('.$k['starttime'].'000)/",to:"/Date('.$k['datetime'].'000)/",label:"');
					echo($k['remark'].'",customClass:"'.$colorClass[mt_rand(0,2)].'",dataObj: "'.$k['remark'].'" }]},');
				}	 
			?>
		],
		months:["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
		dow:["日", "一", "二", "三", "四", "五", "六"],
		<?php if(!isMobile()){ ?>
		navigate: "scroll",
		<?php } ?>
		itemsPerPage:20,
		onItemClick: function(data) {alert(data);}
	});
});
</script>